package com.rybbaby.tss.tasks.core.bean;

import java.util.ArrayList;
import java.util.List;

/**
 * @description 任务调度类模型
 * 
 * @author 谢进伟
 * 
 * @createDate 2016年10月13日 下午3:23:41
 */
public class TaskClassBean {
	
	private String id;
	private String className;
	private Class<?> cls;
	private String remark;
	private List<TaskMethodBean> taksMethods;
	
	public String getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	
	public String getClassName() {
		return className;
	}
	
	public void setClassName(String className) {
		this.className = className;
	}
	
	public Class<?> getCls() {
		return cls;
	}
	
	public void setCls(Class<?> cls) {
		this.cls = cls;
	}
	
	public String getRemark() {
		return remark;
	}
	
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	public boolean addTaksMethod(TaskMethodBean method) {
		if(this.taksMethods == null) {
			this.taksMethods = new ArrayList<TaskMethodBean>();
		}
		return taksMethods.add(method);
	}
	
	public List<TaskMethodBean> getTaksMethods() {
		return taksMethods;
	}
	
	@Override
	public String toString() {
		return "TaskClassBean [className=" + className + ", cls=" + cls + ", taksMethods=" + taksMethods + "]";
	}
}
